<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Services\UploadManager;

class FileuploadController extends AdminController
{

    public function __construct()
    {
        // 
    }

    // 文件上传
    public function upload(Request $request, UploadManager $up)
    {
        $result = $up->upload($request);
        
        return response()->json($result);
    }

    // 百度编辑器文件上传
    public function ueditor(Request $request, UploadManager $up)
    {
        $result = $up->ueditor($request); 
        
        return response()->json($result); 
    }
}
